<script setup>
import { ref, onMounted, onUnmounted } from "vue";
const data = ref("");
let setTimeoutId = null;

onMounted(() => {
  setTimeoutId = setTimeout(() => {
    data.value = "小滴课堂";
  }, 100);
});

onUnmounted(() => {
  clearTimeout(setTimeoutId);
});
</script>

<template>
  <div>接口请求的内容：</div>
  <span>{{ data }}</span>
</template>
